﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Convertor.Plugin
{
    [Serializable]
    public class SelectedPluginContentCollection : IList<SelectedPluginContent>
    {
        private List<SelectedPluginContent> list = new List<SelectedPluginContent>();

        #region IList<SelectedPluginContent> 成员

        public int IndexOf(SelectedPluginContent item)
        {
            throw new NotImplementedException();
        }

        public void Insert(int index, SelectedPluginContent item)
        {
            list.Insert(index, item);
        }

        public void RemoveAt(int index)
        {
            list.RemoveAt(index);
        }

        public SelectedPluginContent this[int index]
        {
            get
            {
                return list[index];
            }
            set
            {
                list[index]=value;
            }
        }

        #endregion

        #region ICollection<SelectedPluginContent> 成员

        public void Add(SelectedPluginContent item)
        {
            list.Add(item);
        }

        public void Clear()
        {
            list.Clear();
        }

        public bool Contains(SelectedPluginContent item)
        {
            return list.Contains(item);
        }

        public void CopyTo(SelectedPluginContent[] array, int arrayIndex)
        {
            list.CopyTo(array, arrayIndex);
        }

        public int Count
        {
            get { return list.Count; }
        }

        public bool IsReadOnly
        {
            get { throw new NotImplementedException(); }
        }

        public bool Remove(SelectedPluginContent item)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IEnumerable<SelectedPluginContent> 成员

        public IEnumerator<SelectedPluginContent> GetEnumerator()
        {
            return list.GetEnumerator();
        }

        #endregion

        #region IEnumerable 成员

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return list.GetEnumerator();
        }

        #endregion
    }
}
